Morphology processing as it is applied to image processing and machine vision usually involves replacing each pixel in an image or image section being processed with a function of itself and its neighbor pixels.
The most useful functions are non-linear. Accordingly, a preferred technique that is well known in the art is to represent the function as a look-up table. The look-up table is indexed by a numerical value formed by concatenating all the pixel values found in a neighborhood together. For example, a morphology processing engine for 3.times.3 neighborhoods of binary pixel values needs to have an index value containing 9 bits, corresponding to a look-up table containing 512 different possible values. By setting the values in this look-up table, it is possible to choose an output value for each of the 512 possible input neighborhoods.
Iterative processing using different functions is an especially powerful technique. This sort of processing engine may be used to implement convex hull, various skeleton operators, operators that remove spatial noise, and many other operators which are useful for image processing and machine vision..sup.1
 FNT .sup.1 Haralick, Robert M. and Shapiro, Linda G. "Computer and Robot Vision, Volume I", Addison- Wesley, 1992.
Morphology processing is also applicable to gray-scale images, where each image pixel is represented by an intensity value. Most image processing and machine vision systems represent image intensity values using between 6 and 16-bit quantities. Implementing the morphology neighborhood functions using look-up tables is prohibitively expensive for these images, but several non-linear operators such as minimum and maximum may be implemented economically using appropriate processing hardware.
Used in conjunction with image arithmetic operations, morphology processing becomes even more useful. Image arithmetic may be used to implement a mask determining which pixels are to be processed. It may also be used to compare images with and without morphology processing, or images which have been subject to different processing steps.
One of the primary difficulties associated with morphology and other neighborhood-based processing is the fact that the processing function is only fully defined for pixels that have a complete complement of neighbors. Pixels that are adjacent to the boundary of the image have a number of neighbors which are outside of the image. The usual method of dealing with this problem is to produce a result image that is smaller than the original image. The original image must contain a quiet zone of background data surrounding the subject data to be processed.